package org.yzhzc.system.domain.sysuser.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.yzhzc.common.core.domain.BaseEntity;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("tb_sys_user")  // 指定数据库表名
public class SysUser extends BaseEntity {

    @TableId(value = "user_id", type = IdType.ASSIGN_ID)  // 将userId映射到user_id列
    private Long userId;  // 用户id，主键

    @NotBlank(message = "用户账号不能为空")
    private String userAccount;  // 用户账号

    @NotBlank(message = "用户密码不能为空")
    private String password;  // 用户密码

    @NotBlank(message = "用户名称不能为空")
    private String nickName;  // 昵称
}
